// API响应类型定义
import type { UserInfo } from './user'

export interface ApiResponse<T = any> {
    success: boolean
    data?: T
    message: string
    timestamp: string
    error?: {
        code: string
        message: string
        details?: Record<string, string[]>
    }
}

export interface PaginatedResponse<T = any> {
    success: boolean
    data: T[]
    pagination: {
        currentPage: number
        perPage: number
        total: number
        lastPage: number
    }
    message: string
}

export interface AuthResponse {
    user: UserInfo
    token: string
    expiresIn: number
}